package jwdt.xadmin.bbs.interceptor;

import jwdt.xadmin.bbs.bean.TBconfig;
import jwdt.xadmin.bbs.bean.TBuser;

import com.ezerg.db.Jdb;
import com.ezerg.web.Form;
import com.ezerg.web.Interceptor;
import com.ezerg.web.Module;

public class BbsInterceptor implements Interceptor {

	public Object intercept(Form f, Module m) throws Exception {
		f.add("links",Jdb.get().query("select * from t_link where linktype=2 and pass=1", 6));//链接
		// 增加全局系统定义
		TBuser userInfo = (TBuser)f.getSession("bbsUserInfo");
		f.add("bbscfg", Jdb.get().get(TBconfig.class, 1)).add("bbsUserInfo", userInfo);
		return null; 
	}

}
